home *** CD-ROM | disk | FTP | other *** search
/ Practical Internet 2003 March / Practical Internet Issue 78.iso / pc / PracticalInternet.exe / scripts / DefineButton2_81 / BUTTONCONDACTION on(release).as
Encoding:
Text File  |  2003-02-06  |  472 b   |  18 lines

  1. on(release){
  2.    NumberOfChars = length(filetolaunch);
  3.    LookForThisChar = NumberOfChars - "3";
  4.    trace("This is Look for this char" add LookForThisChar);
  5.    if(filetolaunch.substr(LookForThisChar,"4") eq ".exe")
  6.    {
  7.       trace("I\'m an exe");
  8.       fscommand("exec",eval("../../:PathtoCD") add filetolaunch);
  9.    }
  10.    else
  11.    {
  12.       getURL(filetolaunch,"");
  13.       trace("I\'m a URL");
  14.    }
  15.    set("../:disclaimeraccepted","yes");
  16.    gotoAndStop(1);
  17. }
  18.